package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.antlr.v4.runtime.misc.NotNull;
import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.SubQueryExpressionContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.ExpressionExistsContext;

/**
 * exists表达式的遍历
 * @author zwd
 *
 */
public class ExpressionExistsVisitor extends AbsCQLParserBaseVisitor<ExpressionExistsContext>{

	private ExpressionExistsContext context = null;
	
	public ExpressionExistsVisitor() {
		context = new ExpressionExistsContext();
	}
	
	@Override
	protected ExpressionExistsContext defaultResult() {
		return context;
	}
	
	@Override
	public ExpressionExistsContext visitSubQueryExpression(@NotNull SubQueryExpressionContext ctx) {
		SubQueryExpressionVisitor visitor = new SubQueryExpressionVisitor();
        context.setSubquery(visitor.visit(ctx));
        return context;
	}
	

}
